<html>
<head>
<title>Munpia Notifier for Google Chrome</title>
<script>
function save_options() {
	if(document.getElementById('dur_1').selected)
		localStorage.duration = 1;
	if(document.getElementById('dur_5').selected)
		localStorage.duration = 5;
	else if(document.getElementById('dur_10').selected)
		localStorage.duration = 10;
	else if(document.getElementById('dur_30').selected)
		localStorage.duration = 30;

	chrome.extension.sendRequest({'action' : 'update'}, function(data){});
}

function load_options() {
	document.getElementById('dur_'+localStorage.duration).selected = true;
}
</script>
</head>
<body onload="load_options()">
<h1>Munpia Notifier</h2>

<p>Update Period
<select id="dur">
<option id="dur_1" value="1"/>1 minutes</option>
<option id="dur_5" value="5"/>5 minutes</option>
<option id="dur_10" value="10"/>10 minutes</option>
<option id="dur_30" value="30"/>30 minutes</option>
</select>
</p>
<button onclick="save_options()">Save</button>
</body>
</html>
